/*===========================================================================
  Copyright (C) 2014 by the Okapi Framework contributors
-----------------------------------------------------------------------------
  This library is free software; you can redistribute it and/or modify it 
  under the terms of the GNU Lesser General Public License as published by 
  the Free Software Foundation; either version 2.1 of the License, or (at 
  your option) any later version.

  This library is distributed in the hope that it will be useful, but 
  WITHOUT ANY WARRANTY; without even the implied warranty of 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 
  General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License 
  along with this library; if not, write to the Free Software Foundation, 
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  See also the full LGPL text here: http://www.gnu.org/copyleft/lesser.html
===========================================================================*/

package net.sf.okapi.lib.xliff2.processor;

import net.sf.okapi.lib.xliff2.reader.Event;

/**
 * Provides the methods to handle events generated by the {@link net.sf.okapi.lib.xliff2.reader.XLIFFReader XLIFFReader} object.
 */
public interface IEventHandler {

	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#START_DOCUMENT START_DOCUMENT} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleStartDocument (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#END_DOCUMENT END_DOCUMENT} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleEndDocument (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#START_XLIFF START_XLIFF} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleStartXliff (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#END_XLIFF END_XLIFF} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleEndXliff (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#START_FILE START_FILE} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleStartFile (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#SKELETON SKELETON} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleSkeleton (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#MID_FILE MID_FILE} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleMidFile (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#END_FILE END_FILE} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleEndFile (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#START_GROUP START_GROUP} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleStartGroup (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#END_GROUP END_GROUP} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleEndGroup (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#INSIGNIFICANT_PART INSIGNIFICANT_PART} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleInsignificantPart (Event event);
	
	/**
	 * Handles the {@link net.sf.okapi.lib.xliff2.reader.EventType#TEXT_UNIT TEXT_UNIT} event.
	 * @param event the event to process.
	 * @return the processed event.
	 */
	public Event handleUnit (Event event);
	
}
